// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) definits fieldsfirst ansi space safe 
// Source File Name:   Cruise.java

package jones.behavior;

import jones.SimpleRobotInterface;

// Referenced classes of package jones.behavior:
//            Behavior, Arbiter

public class Cruise
    implements Behavior
{

    private static final String NAME = "Cruise";
    private static final int DEFAULT_WHEEL_SPEED = 255;
    private int leftWheelSpeed = 0;
    private int rightWheelSpeed = 0;

    public Cruise()
    {
        leftWheelSpeed = 255;
        rightWheelSpeed = 255;
    }

    public Cruise(int leftWheelSpeed, int rightWheelSpeed)
    {
        this.leftWheelSpeed = 255;
        this.rightWheelSpeed = 255;
        setLeftWheelSpeed(leftWheelSpeed);
        setRightWheelSpeed(rightWheelSpeed);
    }

    public String getName()
    {
        return "Cruise";
    }

    public int getLeftWheelSpeed()
    {
        return leftWheelSpeed;
    }

    public void setLeftWheelSpeed(int leftWheelSpeed)
    {
        this.leftWheelSpeed = leftWheelSpeed;
    }

    public int getRightWheelSpeed()
    {
        return rightWheelSpeed;
    }

    public void setRightWheelSpeed(int rightWheelSpeed)
    {
        this.rightWheelSpeed = rightWheelSpeed;
    }

    public void update(double d)
    {
    }

    public void act(Arbiter arbiter)
    {
        SimpleRobotInterface robot = (SimpleRobotInterface)arbiter.getRobotInterface(((Behavior) (this)));
        robot.setLeftWheelSpeed(leftWheelSpeed);
        robot.setRightWheelSpeed(rightWheelSpeed);
    }

    public String toString()
    {
        return "Cruise";
    }
}
